package com.ljh.seckill.entity;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author grung
 * @Date 2021/2/22 17:33
 * @Version 1.0
 */

@Data
@Entity
@Table(name = "tbl_order")
public class Order implements Serializable {

    @Id
    @Column(name = "id", columnDefinition = "bigint COMMENT '主键'")
    private String id;

    @Column(name = "resource_id", columnDefinition = "varchar(32) COMMENT '资源ID'")
    private String resourceId;

    @Column(name = "user_id", columnDefinition = "varchar(32) COMMENT '用户ID'")
    private String userId;

    @Column(name = "order_amount", columnDefinition = "decimal(15,2) default '0' COMMENT '订单金额'")
    private BigDecimal orderAmount;

    @Column(name = "order_status", columnDefinition = "varchar(16) COMMENT '订单状态'")
    private String orderStatus;

    @Column(name = "create_date", columnDefinition = "datetime NOT NULL COMMENT '创建时间'")
    private Date createDate;

    @Column(name = "update_date", columnDefinition = "datetime NOT NULL COMMENT '更新时间'")
    private Date updateDate;

}
